using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.Data.Filtering;
namespace ChuanPlus.FormControl
{
    public partial class ControlViewProduction : DevExpress.XtraEditors.XtraUserControl
    {
        public ControlViewProduction()
        {
            InitializeComponent();
            dateProductionFrom.DateTime = dateProductionTo.DateTime = DateTime.Now.Date;
            GetResult(dateProductionFrom.DateTime, dateProductionTo.DateTime);
        }

        private void btnGo_Click(object sender, EventArgs e)
        {
            GetResult(dateProductionFrom.DateTime, dateProductionTo.DateTime);
        }
        private void GetResult(DateTime from, DateTime to)
        {
            xpColProduction.Criteria = new BetweenOperator("ProductionDate", from, to);
        }
    }
}
